﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace MyUtility
{
    public partial class P2 : PhoneApplicationPage
    {
        public P2()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            //P2.xaml?strRate=33.33&strAmt=12345
            string strRate="";
            string strAmt="";
            if (NavigationContext.QueryString.TryGetValue("strRate",out strRate) &&
                NavigationContext.QueryString.TryGetValue("strAmt",out strAmt)
                ) {
                    App app = App.Current as App;
                    txtResult.Text = (Double.Parse(strRate) * Double.Parse(app.centralRate)).ToString();
                    //txtResult.Text = (Double.Parse(strRate) * Double.Parse(strAmt)).ToString();
            }
        }
    }
}